MenuHost
A class that allows you to host and keep track of MenuProviders that will supply android.view.MenuItems to the app bar.
See also
Functions
Link copied to clipboard
abstract fun addMenuProvider(@NonNull provider: @NonNull MenuProvider, @NonNull owner: @NonNull LifecycleOwner)
Adds the given MenuProvider to this MenuHost.
abstract fun addMenuProvider(@NonNull provider: @NonNull MenuProvider, @NonNull owner: @NonNull LifecycleOwner, state: @NonNull Lifecycle.State)
Adds the given MenuProvider to this MenuHost once the given LifecycleOwner reaches the given Lifecycle.State.
Link copied to clipboard
Invalidates the android.view.Menu to ensure that what is displayed matches the current internal state of the menu.
Link copied to clipboard
Removes the given MenuProvider from this MenuHost.